<!DOCTYPE html>
{assign name="pn" value="index" }
<html>
<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
    <meta name="renderer" content="webkit|ie-comp|ie-stand" />
    <title>收银台</title>
    <meta name="baidu-site-verification" content="code-xEvBW4PmsD" />
    <meta name="keywords" content="{:keywords}" />
    <meta name="description" content="学海网校系统,专业的教学分享平台，助你学有所成" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />

    <script src="{:jquery}"></script>
    <link href="{:bootstrap_min_css}" rel="stylesheet">
    <script src="{:bootstrap_min_js}"></script>

    <link rel="stylesheet" href="/min/?g=css&v={:version}-{$r}">
    <script src="/min/?g=js&v={:version}-{$r}"></script>
</head>
<body>

{include file="inc/header" /}

<input type="hidden" id="payjs_order_id" value="{$data.payjs_order_id}">
<div class="container">
<div>
    <a href="{:BASE_URL}/payjs/test?fee=101">1.01元支付链接</a>
</div>
    <div>
        <img src="{$data.qrcode}" alt="">
        <div>订单金额：{$data.total_fee*0.01}元</div>
        <div>payjs_order_id：{$data.payjs_order_id}</div>
        <div id="pay_status_box">支付状态：未支付</div>
        <div>
            <button id="btn1">查询支付状态</button>
        </div>
    </div>

</div>

{include file="inc/footer" /}

<script>
    var payjs_order_id = $('#payjs_order_id').val();

    $('#btn1').click(function () {
        $.post('/payjs/check', {payjs_order_id: payjs_order_id}, function (ret) {
            console.log(ret)
            if (ret.status == 1) {
                $('#pay_status_box').text('支付状态：已支付');
            }
        })
    });

    setInterval(function () {

    }, 1000);
</script>
</script>
</body>
</html>
